package com.indusfo.spc.controller;

import com.indusfo.spc.pojo.DeviceTypeInspect;
import com.indusfo.spc.service.DeviceTypeInspectService;
import com.indusfo.spc.vo.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @ClassName DeviceTypeInspectController  设备类型点检项目
 * @Description TODO
 * @Author louk
 * @Date 2019/12/11 9:16
 * @Version 1.0
 */
@Controller
@RequestMapping("/service/deviceTypeInspect")
public class DeviceTypeInspectController {

    @Resource
    DeviceTypeInspectService deviceTypeInspectService;

    /**
     * 批量新增设备类型点检项目明细
     * @param inspectIds
     * @param deviceTypeId
     * @return
     */
    @ResponseBody
    @RequestMapping("updateDeviceTypeInspectList")
    JSONObject updateDeviceTypeInspectList(Integer[] inspectIds, Integer deviceTypeId){
            return deviceTypeInspectService.updateDeviceTypeInspectList(inspectIds,deviceTypeId);
    }

    /**
     * 删除设备类型点检项目明细
     * @param deviceTypeInspectId
     * @return
     */
    @ResponseBody
    @RequestMapping("defineDeviceTypeInspect")
    JSONObject defineDeviceTypeInspect(Integer deviceTypeInspectId,Integer dataState){
        return deviceTypeInspectService.defineDeviceTypeInspect(deviceTypeInspectId,dataState);
    }
    /**
     * 批量删除设备类型点检项目明细
     * @param deviceTypeInspectIds
     * @return
     */
    @ResponseBody
    @RequestMapping("defineDeviceTypeInspectList")
    JSONObject defineDeviceTypeInspectList(Integer[] deviceTypeInspectIds,Integer dataState){
        return deviceTypeInspectService.defineDeviceTypeInspectList(deviceTypeInspectIds,dataState);
    }

    /**
     * 查询设备类型点检项目明细
     * @param deviceTypeInspect
     * @return
     */
    @ResponseBody
    @RequestMapping("queryByDeviceType")
    JSONObject queryByDeviceType(DeviceTypeInspect deviceTypeInspect){
        return deviceTypeInspectService.queryByDeviceType(deviceTypeInspect);
    }
}
